<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	
	<p:dialog appendToBody="true" modal="true" closable="true" header="Buscar Clientes de Portal"
		widgetVar="dialogoBuscaDescricao" width="540"
		resizable="false">
		<h:form id="formBuscaDescricao">
		<div class="dialogo_container_18">
			<util:dialogoLabel grid="5" value="Código" />
			<util:dialogoLabel grid="13" value="Nome" />
			<div class="dialogo_grid_5">
				<p:inputText value="#{deBean.varCodigo}" styleClass="dialogo_width_4"/>
			</div>
			<div class="dialogo_grid_13">
				<p:inputText value="#{deBean.varNome}" styleClass="dialogo_width_13"/>
			</div>
			<util:dialogoLabel value="Projeto" />
			<div class="dialogo_grid_14">
				<p:inputText value="#{deBean.varProjeto}" styleClass="dialogo_width_14"/>
			</div>
			<div class="dialogo_grid_4">
				<ui:include src="/views/layouts/_ajaxStatus.xhtml" />
				<p:commandButton value="#{i18n.btn_FiltrarPrompt}" style="margin-top:-1px;float:right" icon="ui-icon ui-icon-search"
					action="#{deBean.buscarDescricao}" update="formBuscaDescricao:dataTableBuscaDescricao"
					id="btnFiltrar"/>
			</div>
			<div class="dialogo_grid_18">
				<br/>
				<p:dataTable widgetVar="dataTableBuscaDescricao" 
							id="dataTableBuscaDescricao" 
							paginator="true" rows="10" dynamic="true" 
							selection="#{deBean.deInstanceTemp}" 
							value="#{deBean.deList}" 
							selectionMode="single" var="var"
							emptyMessage="#{i18n.NenhumDescricaoEncontrado}">
					<p:column headerText="Nome">  
			            <h:outputText value="#{var.codigo}" />  
			        </p:column> 
				</p:dataTable>
			</div>
			<util:hr />
			<div class="dialogo_grid_18 right">
				<p:commandButton action="#{deBean.selecionarDescricao}"  
					update="@form, :formPrincipal" onstart="spinner.show();" value="#{i18n.btn_Selecionar}"
					oncomplete="spinner.hide();dialogoBuscaDescricao.hide()"/>
				<p:commandButton action="#{deBean.cancelarSelecionarDescricao}" 
					update="@form" onclick="dialogoBuscaDescricao.hide()" value="#{i18n.btn_Cancelar}" />	
			</div>
		</div>
		</h:form>
		<util:dataTableBlockUI trigger=":formBuscaDescricao:dataTableBuscaDescricao"
			block=":formBuscaDescricao:dataTableBuscaDescricao" />
		<util:dataTableBlockUI trigger=":formBuscaDescricao:btnFiltrar"
			block=":formBuscaDescricao:dataTableBuscaDescricao" />
	</p:dialog>
	
</f:view>